package com.ssh.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Petinfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="petinfo")
public class Petinfo implements java.io.Serializable {

	// Fields

	private Integer petId;
	private String petName;
	private String petSex;
	private Integer petStrength;
	private Integer petCute;
	private Integer petLove;
	private String petIntro;
	private String petOwnerName;
	private String petOwnerEmail;
	private String petPassword;
	private String petPic;
	private Integer petType;
	private Set<Petdiary> petdiaries = new HashSet<Petdiary>(0);

	// Constructors

	/** default constructor */
	public Petinfo() {
	}

	/** minimal constructor */
	public Petinfo(String petName) {
		this.petName = petName;
	}

	/** full constructor */
	public Petinfo(String petName, String petSex, Integer petStrength,
			Integer petCute, Integer petLove, String petIntro,
			String petOwnerName, String petOwnerEmail, String petPassword,
			String petPic, Integer petType, Set<Petdiary> petdiaries) {
		this.petName = petName;
		this.petSex = petSex;
		this.petStrength = petStrength;
		this.petCute = petCute;
		this.petLove = petLove;
		this.petIntro = petIntro;
		this.petOwnerName = petOwnerName;
		this.petOwnerEmail = petOwnerEmail;
		this.petPassword = petPassword;
		this.petPic = petPic;
		this.petType = petType;
		this.petdiaries = petdiaries;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public Integer getPetId() {
		return this.petId;
	}

	public void setPetId(Integer petId) {
		this.petId = petId;
	}

	public String getPetName() {
		return this.petName;
	}

	public void setPetName(String petName) {
		this.petName = petName;
	}

	public String getPetSex() {
		return this.petSex;
	}

	public void setPetSex(String petSex) {
		this.petSex = petSex;
	}

	public Integer getPetStrength() {
		return this.petStrength;
	}

	public void setPetStrength(Integer petStrength) {
		this.petStrength = petStrength;
	}

	public Integer getPetCute() {
		return this.petCute;
	}

	public void setPetCute(Integer petCute) {
		this.petCute = petCute;
	}

	public Integer getPetLove() {
		return this.petLove;
	}

	public void setPetLove(Integer petLove) {
		this.petLove = petLove;
	}

	public String getPetIntro() {
		return this.petIntro;
	}

	public void setPetIntro(String petIntro) {
		this.petIntro = petIntro;
	}

	public String getPetOwnerName() {
		return this.petOwnerName;
	}

	public void setPetOwnerName(String petOwnerName) {
		this.petOwnerName = petOwnerName;
	}

	public String getPetOwnerEmail() {
		return this.petOwnerEmail;
	}

	public void setPetOwnerEmail(String petOwnerEmail) {
		this.petOwnerEmail = petOwnerEmail;
	}

	public String getPetPassword() {
		return this.petPassword;
	}

	public void setPetPassword(String petPassword) {
		this.petPassword = petPassword;
	}

	public String getPetPic() {
		return this.petPic;
	}

	public void setPetPic(String petPic) {
		this.petPic = petPic;
	}

	public Integer getPetType() {
		return this.petType;
	}

	public void setPetType(Integer petType) {
		this.petType = petType;
	}
	@OneToMany(cascade={CascadeType.ALL},fetch=FetchType.EAGER,mappedBy="petinfo")
	public Set<Petdiary> getPetdiaries() {
		return this.petdiaries;
	}

	public void setPetdiaries(Set<Petdiary> petdiaries) {
		this.petdiaries = petdiaries;
	}

	@Override
	public String toString() {
		return "Petinfo [petCute=" + petCute + ", petId=" + petId
				+ ", petIntro=" + petIntro + ", petLove=" + petLove
				+ ", petName=" + petName + ", petOwnerEmail=" + petOwnerEmail
				+ ", petOwnerName=" + petOwnerName + ", petPassword="
				+ petPassword + ", petPic=" + petPic + ", petSex=" + petSex
				+ ", petStrength=" + petStrength + ", petType=" + petType
				+ ", petdiaries=" + petdiaries + "]";
	}

}